﻿//using System;
//using System.Collections;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Xml;
//using System.Xml.XPath;
//using System.Xml.Xsl;
//using System.Diagnostics;


//namespace GenericLibrary.Xml.XPath {

//    public class XPathNavigatorKeyComparer : IComparer<XPathNavigator> {

//        private XPathExpression _keyExpression;

//        public XPathNavigatorKeyComparer( string keyExpression ) {
//            try {
//                this._keyExpression = XPathExpression.Compile( keyExpression );
//            } catch( Exception ) {
//                Debug.Assert( false );
//                throw;
//            }
//        }

//        #region IComparer<XPathNavigator> Members

//        public int Compare( XPathNavigator x, XPathNavigator y ) {
//            try {
//                return Comparer.Default.Compare( x.Evaluate( this._keyExpression ), y.Evaluate( this._keyExpression ) );
//            } catch( Exception ) {
//                Debug.Assert( false );
//                throw;
//            }
//        }

//        #endregion
//    }
//}
